package com.wenli.graduate2022.wenliGreenShop.service.servImpl;

import com.wenli.graduate2022.wenliGreenShop.entity.Review;
import com.wenli.graduate2022.wenliGreenShop.repository.mapper.ReviewMapper;
import com.wenli.graduate2022.wenliGreenShop.service.servDao.ReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author HuangHai
 * @date 2021/10/13 16:28
 */
@Service
public class ReviewServImpl implements ReviewService {

    @Autowired
    ReviewMapper reviewMapper;

    @Override
    public List<Review> findByUserId(Integer id) {
        return reviewMapper.findByUserId(id);
    }

    @Override
    public List<Review> findByProductId(Integer id) {
        return reviewMapper.findByProductId(id);
    }
}
